/**
 * 
 */
package net.efo.model;

import java.util.Vector;

import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;

import model.WikiNode;
import net.efo.controller.DocumentController;

/**
 * @author johnydoe
 *
 */
public class TreeHierarchy implements TreeModel {

	private static final long serialVersionUID = 6237366918794020795L;
	private Vector<TreeModelListener> treeModelListeners = new Vector<TreeModelListener>();
	private Vector<Document> documents;
	private DocumentController docController = null;

	public TreeHierarchy() {
	}

	public void addTreeModelListener(TreeModelListener arg0) {
		this.treeModelListeners.addElement(arg0);
	}

	public Object getChild(Object arg0, int arg1) {
		Document doc = (Document)arg0;
		Integer childId = doc.getTags().get(arg1);
		Document resultDocument = this.docController.getDocumentById(childId);
		
		return resultDocument;
	}

	public int getChildCount(Object arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	public int getIndexOfChild(Object arg0, Object arg1) {
		// TODO Auto-generated method stub
		return 0;
	}

	public Object getRoot() {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean isLeaf(Object arg0) {
		// TODO Auto-generated method stub
		return false;
	}

	public void removeTreeModelListener(TreeModelListener arg0) {
		// TODO Auto-generated method stub
		
	}

	public void valueForPathChanged(TreePath arg0, Object arg1) {
		// TODO Auto-generated method stub
		
	}

}
